package Spil;

public class Account {

	private int balance;
	private boolean lose;

	public Account (int startingAmount) {
		this.balance = startingAmount;
		this.lose = false;
	}
	
	public void addBalance(int money) {
		this.balance = this.balance + money;

		if (this.balance < 0)
		{
			this.balance = 0;
			this.lose = true;
		}
	}
	
	public int getBalance() {
		return this.balance;
	}

	public boolean getLose() {
		return this.lose;
	}
	
}
